package com.qpl.depression.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.qpl.depression.entity.Article;
import com.qpl.depression.repository.ArticleRepository;
import com.qpl.depression.service.ArticleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author qpl
 * @since 2021-04-07
 */
@Service
public class ArticleServiceImpl extends ServiceImpl<ArticleRepository, Article> implements ArticleService {
    @Resource
    private ArticleRepository articleRepository;

    /**
     * 随机获取文章列表
     *
     * @return 文章列表集合
     */
    @Override
    public List<Article> getByRandom() {
        return articleRepository.getByRandom();
    }
}
